136 research outputs found
A compositional Semantics for CHR
Constraint Handling Rules (CHR) are a committed-choice declarative language
which has been designed for writing constraint solvers. A CHR program consists
of multi-headed guarded rules which allow one to rewrite constraints into
simpler ones until a solved form is reached.
CHR has received a considerable attention, both from the practical and from
the theoretical side. Nevertheless, due the use of multi-headed clauses, there
are several aspects of the CHR semantics which have not been clarified yet. In
particular, no compositional semantics for CHR has been defined so far.
In this paper we introduce a fix-point semantics which characterizes the
input/output behavior of a CHR program and which is and-compositional, that is,
which allows to retrieve the semantics of a conjunctive query from the
semantics of its components. Such a semantics can be used as a basis to define
incremental and modular analysis and verification tools
A Multicore Tool for Constraint Solving
*** To appear in IJCAI 2015 proceedings *** In Constraint Programming (CP), a
portfolio solver uses a variety of different solvers for solving a given
Constraint Satisfaction / Optimization Problem. In this paper we introduce
sunny-cp2: the first parallel CP portfolio solver that enables a dynamic,
cooperative, and simultaneous execution of its solvers in a multicore setting.
It incorporates state-of-the-art solvers, providing also a usable and
configurable framework. Empirical results are very promising. sunny-cp2 can
even outperform the performance of the oracle solver which always selects the
best solver of the portfolio for a given problem
Solving XCSP problems by using Gecode
Gecode is one of the most efficient libraries that can be used for constraint
solving. However, using it requires dealing with C++ programming details. On
the other hand several formats for representing constraint networks have been
proposed. Among them, XCSP has been proposed as a format based on XML which
allows us to represent constraints defined either extensionally or
intensionally, permits global constraints and has been the standard format of
the international competition of constraint satisfaction problems solvers. In
this paper we present a plug-in for solving problems specified in XCSP by
exploiting the Gecode solver. This is done by dynamically translating
constraints into Gecode library calls, thus avoiding the need to interact with
C++.Comment: 5 pages, http://ceur-ws.org/Vol-810 CILC 201
SUNNY-CP and the MiniZinc Challenge
In Constraint Programming (CP) a portfolio solver combines a variety of
different constraint solvers for solving a given problem. This fairly recent
approach enables to significantly boost the performance of single solvers,
especially when multicore architectures are exploited. In this work we give a
brief overview of the portfolio solver sunny-cp, and we discuss its performance
in the MiniZinc Challenge---the annual international competition for CP
solvers---where it won two gold medals in 2015 and 2016. Under consideration in
Theory and Practice of Logic Programming (TPLP)Comment: Under consideration in Theory and Practice of Logic Programming
(TPLP
Transformations of CCP programs
We introduce a transformation system for concurrent constraint programming
(CCP). We define suitable applicability conditions for the transformations
which guarantee that the input/output CCP semantics is preserved also when
distinguishing deadlocked computations from successful ones and when
considering intermediate results of (possibly) non-terminating computations.
The system allows us to optimize CCP programs while preserving their intended
meaning: In addition to the usual benefits that one has for sequential
declarative languages, the transformation of concurrent programs can also lead
to the elimination of communication channels and of synchronization points, to
the transformation of non-deterministic computations into deterministic ones,
and to the crucial saving of computational space. Furthermore, since the
transformation system preserves the deadlock behavior of programs, it can be
used for proving deadlock freeness of a given program wrt a class of queries.
To this aim it is sometimes sufficient to apply our transformations and to
specialize the resulting program wrt the given queries in such a way that the
obtained program is trivially deadlock free.Comment: To appear in ACM TOPLA
On the Expressive Power of Multiple Heads in CHR
Constraint Handling Rules (CHR) is a committed-choice declarative language
which has been originally designed for writing constraint solvers and which is
nowadays a general purpose language. CHR programs consist of multi-headed
guarded rules which allow to rewrite constraints into simpler ones until a
solved form is reached. Many empirical evidences suggest that multiple heads
augment the expressive power of the language, however no formal result in this
direction has been proved, so far.
In the first part of this paper we analyze the Turing completeness of CHR
with respect to the underneath constraint theory. We prove that if the
constraint theory is powerful enough then restricting to single head rules does
not affect the Turing completeness of the language. On the other hand,
differently from the case of the multi-headed language, the single head CHR
language is not Turing powerful when the underlying signature (for the
constraint theory) does not contain function symbols.
In the second part we prove that, no matter which constraint theory is
considered, under some reasonable assumptions it is not possible to encode the
CHR language (with multi-headed rules) into a single headed language while
preserving the semantics of the programs. We also show that, under some
stronger assumptions, considering an increasing number of atoms in the head of
a rule augments the expressive power of the language.
These results provide a formal proof for the claim that multiple heads
augment the expressive power of the CHR language.Comment: v.6 Minor changes, new formulation of definitions, changed some
details in the proof
Timed Soft Concurrent Constraint Programs: An Interleaved and a Parallel Approach
We propose a timed and soft extension of Concurrent Constraint Programming.
The time extension is based on the hypothesis of bounded asynchrony: the
computation takes a bounded period of time and is measured by a discrete global
clock. Action prefixing is then considered as the syntactic marker which
distinguishes a time instant from the next one. Supported by soft constraints
instead of crisp ones, tell and ask agents are now equipped with a preference
(or consistency) threshold which is used to determine their success or
suspension. In the paper we provide a language to describe the agents behavior,
together with its operational and denotational semantics, for which we also
prove the compositionality and correctness properties. After presenting a
semantics using maximal parallelism of actions, we also describe a version for
their interleaving on a single processor (with maximal parallelism for time
elapsing). Coordinating agents that need to take decisions both on preference
values and time events may benefit from this language. To appear in Theory and
Practice of Logic Programming (TPLP)
Dynamic Choreographies: Theory And Implementation
Programming distributed applications free from communication deadlocks and
race conditions is complex. Preserving these properties when applications are
updated at runtime is even harder. We present a choreographic approach for
programming updatable, distributed applications. We define a choreography
language, called Dynamic Interaction-Oriented Choreography (AIOC), that allows
the programmer to specify, from a global viewpoint, which parts of the
application can be updated. At runtime, these parts may be replaced by new AIOC
fragments from outside the application. AIOC programs are compiled, generating
code for each participant in a process-level language called Dynamic
Process-Oriented Choreographies (APOC). We prove that APOC distributed
applications generated from AIOC specifications are deadlock free and race free
and that these properties hold also after any runtime update. We instantiate
the theoretical model above into a programming framework called Adaptable
Interaction-Oriented Choreographies in Jolie (AIOCJ) that comprises an
integrated development environment, a compiler from an extension of AIOCs to
distributed Jolie programs, and a runtime environment to support their
execution.Comment: arXiv admin note: text overlap with arXiv:1407.097
Dynamic Choreographies - Safe Runtime Updates of Distributed Applications
Programming distributed applications free from communication deadlocks and
races is complex. Preserving these properties when applications are updated at
runtime is even harder. We present DIOC, a language for programming distributed
applications that are free from deadlocks and races by construction. A DIOC
program describes a whole distributed application as a unique entity
(choreography). DIOC allows the programmer to specify which parts of the
application can be updated. At runtime, these parts may be replaced by new DIOC
fragments from outside the application. DIOC programs are compiled, generating
code for each site, in a lower-level language called DPOC. We formalise both
DIOC and DPOC semantics as labelled transition systems and prove the
correctness of the compilation as a trace equivalence result. As corollaries,
DPOC applications are free from communication deadlocks and races, even in
presence of runtime updates.Comment: Technical Repor
- …